#pragma once

#include "StackWalker.h"

#define MAX_STACK_MESSAGE 10000


class DBServiceStackWalker: public StackWalker
{
	char* m_szStackMessage;

public:
	// main showing routine
  virtual BOOL ShowCallstack(
    HANDLE hThread = GetCurrentThread(), 
    const CONTEXT *context = NULL, 
    PReadProcessMemoryRoutine readMemoryFunction = NULL,
    LPVOID pUserData = NULL  // optional to identify some data in the 'readMemoryFunction'-callback
    );

    virtual void OnOutput(LPCSTR szText);
private:
	void WriteEventLogEntry(PWSTR pszMessage, WORD wType);
};


LONG WINAPI ExpFilter(EXCEPTION_POINTERS* pExp, DWORD dwExpCode);
